In [2]:
import pandas as pd
import py2neo
graph = py2neo.Graph()
query="""
MATCH (m:Method)-[:INVOKES*]->(m)
-[:INVOKES]->(dbMethod:Method)
<-[:DECLARES]-(dbClass:Class)
WHERE dbClass.name = "Database"
RETURN m.name as caller, dbClass.name + "." + dbMethod.name as dbMethod
"""
pd.DataFrame(graph.data(query))
Out[2]: